//  泛型接口类
interface BD<T>{
    add(value:T):boolean
    delete(id:number):boolean
    update(value:T,id:number):boolean
    get(id:number):any[]
}

class Mysql<T> implements BD<T>{
    add(value: T): boolean {
       console.log(value)
       return false
    }    
    delete(id: number): boolean {
        throw new Error("Method not implemented.");
    }
    update(value: T, id: number): boolean {
        throw new Error("Method not implemented.");
    }
    get(id: number): any[] {
        var list:any[] = ['1']
        return list
    }
}
class Students{
    public name:string | undefined
    public password:string | undefined
    public id:string | undefined
    constructor(name:string|undefined,password:string|undefined,id:string|undefined){
        this.name = name
        this.password = password
        this.id = id
    }
}
const students = new Students('ywj','ywj19980121','16131018')
const mysqlDbs = new Mysql<Students>()
mysqlDbs.add(students)